SUBDIRS = src
noinst_SCRIPTS = tp.spec
dist_doc_DATA = AUTHORS ChangeLog NEWS README COPYING
EXTRA_DIST = tp.in.spec
CLEANFILES = $(noinst_SCRIPTS)

tp.spec: tp.in.spec Makefile
	$(PACKAGE_PARSE) $(top_srcdir)/tp.in.spec > tp.spec

deepdistcheck:
	make && make clean && make && make distcheck

rpm: tp.spec
	cp tp-$(PACKAGE_VERSION).tar.bz2 ~/rpmbuild/SOURCES/
	cp $(top_srcdir)/tp.spec ~/rpmbuild/SPECS
	( cd ~/rpmbuild/SPECS && rpmbuild --target noarch -ba tp.spec ) && cp ~/rpmbuild/RPMS/noarch/tp-$(PACKAGE_VERSION)-1.*.noarch.rpm $(top_srcdir)/

upload:
	upload texturepacks $(PACKAGE_TARNAME) $(PACKAGE_VERSION) noarch
